<?php
defined('BASEPATH') OR exit('No direct script access allowed');

?>



      
                    <div class="row">
                        <div class="col-md-12">
                             <div class="box">
                                <div class="box-header with-border">

                             

                                <h3 class="box-title">”<?php echo $shop["name"];?>“ 商品标题批量替换</h3>
                                </div>
                                <div class="box-body nav-tabs-custom">
                                    <?php if($message){?>
                                    <div class="alert alert-success">   <?php echo $message;?></div>
                                    <?php } ?>
                                   


        

<ul id="myTab" class="nav nav-tabs" style="margin-bottom:20px;">
	<li <?php if($pagetype!="title3") echo 'class="active"';?>>
		<a href="#replace1" data-toggle="tab">标准替换</a>
	</li>
	<li><a href="#replace2" data-toggle="tab">英文替换</a></li>
	<li <?php if($pagetype=="title3") echo 'class="active"';?>><a href="#replace3" data-toggle="tab">生成标题</a></li>
</ul>


<div class="tab-content no-padding">
    <div class="chart tab-pane <?php if($pagetype!="title3") echo 'active';?>" id="replace1">

    <?php echo form_open(current_url(), array('class' => 'form-horizontal', 'id' => 'form-create_notice')); ?>
                                          <div class="form-group">
                                          <?php  echo '<label for="ruler"'._stringify_attributes(array('class' => 'col-sm-2 control-label')).'>标准替换规则</label>';?>
                                            <div class="col-sm-10">
                                                <span style="line-height:20px;"><?php echo form_textarea($ruler);?></span>
                                                <div class="row" style="margin:10px 3px;color:#333;">
                                                每行一条规则，搜索词与替换词用 = 分割，比如：  find=over  就是把所有find替换成 over，如果需要删除直接写删除的内容一行，如 del，删除所有del内容
                                                </div>
                                            </div>
                                        </div>

                                       
                                    <div class="form-group">
                                    <label class="col-sm-2 control-label">翻译标题</label>
                                    <div class="col-sm-10">
                                    <select class="form-control" name="transtitle">
                                        <option value="0">不翻译</option>
                                        
                                        <option value="en">英语</option>
                                        <option value="ja">日语</option>
                                    </select>
                                    </div>
                                    </div>

                                    <div class="form-group">
                                    <label class="col-sm-2 control-label">翻译属性</label>
                                    <div class="col-sm-10">
                                    <select class="form-control" name="transoption">
                                        <option value="0">不翻译</option>
                                        
                                        <option value="en">英语</option>
                                        <option value="ja">日语</option>
                                    </select>
                                    </div>
                                    </div>


                                    <div class="form-group">
                                    <label class="col-sm-2 control-label">清理标题废词</label>
                                    <div class="col-sm-10">
                                    <select class="form-control" name="cleantitle">
                                        <option value="0">不清理</option>                                        
                                        <option value="1">清理</option>
                                    </select>
                                    </div>
                                    </div>




                                       <div class="form-group">
                                            <div class="col-sm-offset-2 col-sm-10">
                                                <div class="btn-group">
                                                    <?php echo form_hidden('id', $shop["id"]);?>
                                                    <?php echo form_hidden('replacetype', 2);?>                                                    
                                                    <?php echo form_button(array('type' => 'submit', 'class' => 'btn btn-primary btn-flat', 'content' => lang('actions_submit'))); ?>

                                                    <?php echo anchor('admin/tbshop/transoption/'.$shop["id"],'人工翻译属性','class="btn btn-info btn-flat"'); ?>
                                                 </div>
                                            </div>
                                        </div>

                                        <input type="hidden" name="ids" value=" <?php echo $checkstring;?>">
                                    <?php echo form_close();?>



    </div>
    <div class="chart tab-pane" id="replace2">

    <?php echo form_open(current_url(), array('class' => 'form-horizontal', 'id' => 'form-create_notice')); ?>
                                          <div class="form-group">
                                          <?php  echo '<label for="ruler"'._stringify_attributes(array('class' => 'col-sm-2 control-label')).'>英文替换规则</label>';?>
                                            <div class="col-sm-10">
                                                <span style="line-height:20px;"><?php echo form_textarea($ruler);?></span>
                                                <div class="row" style="margin:10px 3px;color:#333;">
                                                每行一条规则，搜索词与替换词用 === 分割，比如：  find===over  就是把所有find替换成 over，如果需要删除替换词写成 [NULL]
                                                </div>
                                            </div>
                                        </div>

                                       

                                       <div class="form-group">
                                            <div class="col-sm-offset-2 col-sm-10">
                                                <div class="btn-group">
                                                    <?php echo form_hidden('id', $shop["id"]);?>
                                                    <?php echo form_hidden('replacetype', 1);?>                                                    
                                                    <?php echo form_button(array('type' => 'submit', 'class' => 'btn btn-primary btn-flat', 'content' => lang('actions_submit'))); ?>
                                                 </div>
                                            </div>
                                        </div>

                                        <input type="hidden" name="ids" value=" <?php echo $checkstring;?>">
                                    <?php echo form_close();?>


    </div>
    <div class="chart tab-pane <?php if($pagetype=="title3") echo 'active';?>" id="replace3">

    <?php echo form_open(current_url(), array('class' => 'form-horizontal', 'id' => 'form-create_notice')); ?>
                                          <div class="form-group">
                                          <?php  echo '<label for="ruler"'._stringify_attributes(array('class' => 'col-sm-2 control-label')).'>统一生成标题</label>';?>
                                            <div class="col-sm-10">
                                                <span style="line-height:20px;">
                                                <input type="text" name="onetitle" value="" id="onetitle" class="form-control">

                                                </span>
                                                
                                            </div>
                                        </div>

                                       
                                  
                                        <div class="form-group">
                                            <div  class="col-sm-offset-2 col-sm-10"><label><input type="checkbox" name="deltitle" value="1"> 清空原标题</label></div>
                                        </div>


                                       <div class="form-group">
                                            <div class="col-sm-offset-2 col-sm-10">
                                                <div class="btn-group">
                                                    <?php echo form_hidden('id', $shop["id"]);?>
                                                    <?php echo form_hidden('replacetype', 3);?>                                                    
                                                    <?php echo form_button(array('type' => 'submit', 'class' => 'btn btn-primary btn-flat', 'content' => lang('actions_submit'))); ?>

                                                 </div>
                                            </div>
                                        </div>

                                        <input type="hidden" name="ids" value=" <?php echo $checkstring;?>">
                                    <?php echo form_close();?>


    </div>

</div>

                                    


                                    


                                  



                                </div>
                            </div>
                         </div>
                    </div>
            
<script>
$(document).ready(function() {
    $('#pushsite').select2();
});
</script>